#ifndef ENV_H_
#define ENV_H_

#ifdef _WIN32

#include <winsock2.h>
#include <ws2tcpip.h>
#include <pthread.h>

typedef pthread_mutex_t lock_t;
typedef pthread_t thread_t;
typedef pthread_cond_t  cond_t;

#define snprintf _snprintf
#define close(fd) closesocket(fd)

#define check_leaks() if (_CrtDumpMemoryLeaks()) printf("Memory leaks!!!!\n");

#elif __linux__

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <pthread.h>

typedef pthread_mutex_t lock_t;
typedef pthread_t thread_t;
typedef pthread_cond_t  cond_t;

#define check_leaks()

#endif

#endif /* ENV_H_ */
